﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrdenCompraRecepSelecGrid.ascx.cs" Inherits="UILGestion.Control.OrdenCompraRecepSelecGrid" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../Scripts/controlGrid.js" type="text/javascript"></script>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript">
     function SelectAll(frm, id) {

         var frm = document.getElementById("itemPlaceHolderContainer");
         for (i = 1; i < frm.rows.length; i++) {
             var checkbox = frm.rows[i].cells[0].childNodes[1];
             if (checkbox != null)
                 checkbox.checked = document.getElementById(id).checked;
         }
     };
    </script>
<asp:DataPager ID="pager" PagedControlID="ListView1" runat="server">
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="ListView1" runat="server" OnDataBound="ListView1_DataBound"  ClientIDMode="Static" class="yui-grid"
    DataKeyNames="idInternal,idProveedor" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer" border="0" runat="server" class="ms-crm-List-Header" >
            <tr id="Tr1" runat="server">
             <th>
            
           <asp:CheckBox runat="server" ID="chkSelectAll" ClientIDMode="Static" onclick="SelectAll('ListView1','chkSelectAll')" />
            </th>
                <th id="Th1" runat="server">
     

                    <asp:LinkButton ID="lb2" CommandName="Sort" CommandArgument="numDocumento" runat="server">Numero</asp:LinkButton>
                </th>
                <th id="Th3" runat="server">
                    <asp:LinkButton ID="lb3" CommandName="Sort" CommandArgument="fechaEmision" runat="server">Fecha</asp:LinkButton>
                </th>
                <th id="Th5" runat="server">
                    <asp:LinkButton ID="LinkButton3" CommandName="Sort" CommandArgument="fechaPedido" runat="server">Fecha Entrega</asp:LinkButton>
                </th>
                <th id="Th2" runat="server">
                    <asp:LinkButton ID="LinkButton1" CommandName="Sort" CommandArgument="proveedor" runat="server">Proveedor</asp:LinkButton>
                </th>
                <th id="Th4" runat="server">
                    <asp:LinkButton ID="LinkButton2" CommandName="Sort" CommandArgument="condicion" runat="server">Falta Recepcion</asp:LinkButton>
                </th>
                
            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>



    </LayoutTemplate>
    <ItemTemplate>
        <tr style='background-color: <%# (Container.DataItemIndex % 2 == 0)?"#eee":"#fff" %>'>
            <td>
                      <asp:CheckBox runat="server" ID="chkEmployeeSelector"  />
             
            </td>
            <td >
                    <%# Eval("numDocumento")%> <br />
            </td>
            
            <td >
                    <%# Eval("fechaEmisionStr")%> <br />
            </td>
            <td >
                    <%# Eval("fechaEntregaStr")%> <br />
            </td>
             <td>
                <%# Eval("Proveedor")%><br />
            </td>
            
            <td align="right">
            <%# Eval("condicion")%><br />
                 
            </td>
          
            <%--<td>
                <%# Eval("MemberStatus") %><br />
                <%# Eval("Age") %>
                -
                <%# Eval("BirthDate") %>
            </td>--%>
            <%--<td>
                <asp:HyperLink ID="AddressLink" runat="server" Target="_blank" NavigateUrl='<%# "http://www.google.com/maps?q=" + Eval("Address") + ",+" + Eval("CityStateZip") %>'
                    Text='<%# Eval("Address") %>'></asp:HyperLink>
                <br />
                <%# Eval("CityStateZip") %>
            </td>--%>
            <%--<td>
                <asp:Repeater ID="Phones" runat="server" DataSource='<%# Eval("Phones") %>'>
                    <ItemTemplate>
                        <%# Container.DataItem %><br />
                    </ItemTemplate>
                </asp:Repeater>
                <cc1:EmailHyperlink ID="EmailLink" runat="server" Text='<%# Eval("Email") %>' Email='<%# Eval("Email") %>'
                    Name='<%# Eval("Name") %>'></cc1:EmailHyperlink>
            </td>--%>
            
           <%-- <td>
                <asp:HyperLink ID="HyperLink1" runat="server" 
                    ToolTip="Add to/Remove from Active Tag"><%# (bool)Eval("HasTag") ? "Remove" : "Add" %></asp:HyperLink>
            </td>--%>
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" style="">
            <tr>
                <td>
                    <h2 style="color: Red ; font-size:small">
                  
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>





    
     